]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dnd: Make startDrag() fail if there is a current grab
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 12 Mar 2019 00:53:16 +0000 (01:53 +0100)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 13 Mar 2019 17:22:35 +0000 (17:22 +0000)
This call just went through stomping over previous drag operations if any,
_maybeStartDrag() accounted for this, but other callers (well, WindowClone
in workspace.js) don't. This must bail out early even if a drag operation is
requested, luckily all callers account for it already.

This broke shell state by preserving connected captured-event handlers if
one tried to drag multiple windows simultaneously through multitouch. We
of course don't support that, now more elegantly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/455

js/ui/dnd.js

index 614ea621d435399650680dc42a9c381225e3e317..929ee0e223e01ae4a578fd89bf286ee7b01c8e97 100644 (file)
@@ -306,6 +306,9 @@ var _Draggable = class _Draggable {
      * for the draggable.
      */
     startDrag(stageX, stageY, time, sequence, device) {
+        if (currentDraggable)
+            return;
+
         if (device == undefined) {
             let event = Clutter.get_current_event();